import React from 'react'
import Menu from '@/views/Menu'
import "@/assets/css/OrderInfo.scoped.css"

const Component = () =>
{
    let [form] = React.UI.Form.useForm()
    let orderid = React.params('orderid') ?? 0;
    //订单表详情
    let [order, setOrder] = useState({})

    let [guest, setGuest] = useState([])

    React.useEffect(() => {
        OrderInfo()
    },[])

    const OrderInfo = async () =>
    {
        var result = await React.request.post('/order/info',{
            orderid:orderid,
            busid:React.business.id,
        })
        console.log(result)
        if(result.code == 0)
        {
            React.toast(result.msg, null, 'fail')
            return false
        }
        setOrder(result.data.order)
        setGuest(result.data.guest)
    }

    return (
        <>
            <div className='top'><div>已支付</div></div>
            <div className='order_info'>
                <div className='info_content'>
                    <div className='content_title'>订单信息：</div>
                    <div className='content_item'>
                        <p>入住时间</p>
                        <div></div>
                    </div>
                    <div className='content_item'>
                        <p>入住天数</p>
                        <div>共0晚</div>
                    </div>
                    <div className='content_item'>
                        <p>房间单价</p>
                        <div className='content_price'>￥0</div>
                    </div>
                </div>
                
            </div>
        </>
    )
}

export default Component